<template>
  <view>
    <!-- 换成日期选择器 -->
    <view class="">
      <button class="calendar-button" type="button" @click="open">打开日历</button>
      <uni-calendar ref="calendar" class="uni-calendar--hook" :clear-date="true" :date="info.date" :insert="info.insert"
        :lunar="info.lunar" :startDate="info.startDate" :endDate="info.endDate" :range="info.range" @confirm="confirm"
        @close="close" />
    </view>
  </view>
</template>

<script>
  export default {
    name: "calendar",
    data() {
      return {
        showCalendar: false,
        info: {
          lunar: true,
          range: true,
          insert: false,
          selected: []
        }
      };
    },
    methods: {
      open() {
        this.$refs.calendar.open()
      }
    }
  }
</script>

<style lang="scss">

</style>
